USE [AnotherSuccessfulProcedure]

IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[MatchPlayerListByMatchIdTeamId]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
	DROP PROCEDURE dbo.MatchPlayerListByMatchIdTeamId
END


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		Neil Wilson
-- Create date: 09/05/2008
-- Description:	Gets a MatchesPlayerList series of records by MatchId and TeamId
-- =============================================
CREATE PROCEDURE MatchPlayerListByMatchIdTeamId

	@MatchId int,
	@TeamId int

AS
BEGIN

	SET NOCOUNT ON;

SELECT [MatchPlayerListId]
      ,[PlayerId]
      ,[TeamId]
	  ,[MatchId]
FROM [AnotherSuccessfulProcedure].[dbo].[MatchPlayerList]

WHERE
	[MatchId] = @MatchId
AND
	[TeamId] = @TeamId
END
GO
